#ifndef								__STREAMCIRCULARBUFFER_H__
#define								__STREAMCIRCULARBUFFER_H__

#include							"SoundPacket.h"
#include							<boost/thread/mutex.hpp>
#include							<boost/array.hpp>

class								StreamCircularBuffer
{
public:
	StreamCircularBuffer(size_t, size_t);
	~StreamCircularBuffer();

private:
	SoundPacket						*_buffer;
	size_t							_capacity;
	size_t							_read;
	size_t							_write;
	boost::mutex						_mutex;

public:
	void							next();
	SoundPacket			       			*get();
	void							packetReady();
	SoundPacket			       			*getPacket();
	bool							empty();
	size_t							size();
	size_t							capacity();

};

#endif // !__STREAMCIRCULARBUFFER_H__
